package com.gxa.dao;

import com.gxa.pojo.Article;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleMapper {


    @Insert("insert into article values (#{title},#{type},#{keyword},#{synopsis},#{cover},#{content},#{releaseWay},#{releaseChannel},#{releasePerson},#{releaseTime})")
    public int insertArticle(Article article);

    public List<Article> selectAllArticles();

    public int deleteArticleByTitle(String title);

    public List<Article> selectArticleByTitleOrType(@Param("title") String title,@Param("type") String type);

    public int batchDelete(String [] titles);
}
